
from mitmproxy import http, websocket
import logging

def responseheaders(flow: http.HTTPFlow):
    flow.response.stream = flow.response.headers.get('content-type', '').startswith('text/event-stream')
    pretty_url = flow.request.pretty_url
    logging.info(f"responseheaders() ****NNNNN***\n pretty_url={pretty_url} \nflow.response={flow.response!r}  \n****NNNNN***\n")

    
